 use TPG.dta, clear

 * We have 4 treatments: NI, I, H-NI, and H-I.  They data are in allocation1 and guess1 and are identified in the data by:
 * baseline==1, CT1==1, CT2==1, and for H-I the identifier is CT2==1 and allocation2, guess2

 *Table 1 is the validity table for Treatment I :
 reg allocation1 guess1 info_mean info_sd if cT1==1
 
 *Table 2 is relevance for Treatment I:
 reg guess1 info_mean info_sd if cT1==1
 
 *Table 3 is put together from the following summaries:

 sum allocation1 guess1 if baseline
 sum allocation1 guess1 if cT1==1
 sum allocation1 guess1 if cT2==1
 sum allocation2 guess2 if cT2==1
 
 *Table 4 is the relationship between Allocations and beliefs with and without IV for the I treatment
 regress allocation1 guess1 if cT1==1
 ivreg2 allocation1 (guess1 = info_mean info_sd) if cT1==1
 ivendog guess1
 
 * Table 5 does this for the H-I Treatment
 regress allocation2 guess2 allocation1 if cT2==1
 ivreg2 allocation2 (guess2 allocation1 = info_mean info_sd guess1) if cT2==1
 ivendog guess2
ivendog allocation1

exit


